import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:online_study/course/course_detail.dart';
import 'package:online_study/mine/required/required_course_item.dart';
import 'package:online_study/theme/size.dart';

class AllRequiredCourse extends StatefulWidget {
  @override
  _AllRequiredCourseState createState() => _AllRequiredCourseState();
}

class _AllRequiredCourseState extends State<AllRequiredCourse> {
  @override
  Widget build(BuildContext context) {
    return ListView.separated(
      itemBuilder: (BuildContext context, int index) {
        return GestureDetector(
          child: RequiredCourseItem(),
          onTap: () {
            Get.to(() => CourseDetailPage());
          },
        );
      },
      separatorBuilder: (BuildContext context, int index) {
        return Divider(
          height: ThemeSize.width1,
        );
      },
      itemCount: 5,
      shrinkWrap: true,
    );
  }
}
